import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:provider/provider.dart';
import 'package:shop/pages/index_page.dart';
import './config/index.dart';
import './provide/current_index_provide.dart';

void main() {
  runApp(
      MultiProvider(
        providers: [
          ChangeNotifierProvider(
            create: (context) => CurrentIndexProvide(),
          )
        ],
        child: const MyApp(),
      )

  );
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});
  @override
  Widget build(BuildContext context) {
    return ScreenUtilInit(
      designSize: const Size(750,1334),
      minTextAdapt: true,
      splitScreenMode: true,
      builder: (_,child){
        return MaterialApp(
          title: KString.mainTitle, // Flutter女装商城
          debugShowCheckedModeBanner: false,
          // 主题
          theme: ThemeData(
            primaryColor: KColor.primaryColor, // 主题颜色
            // useMaterial3: true,
          ),
          home: IndexPage(),
        );
      },
    );

  }
}
